configure_file(
    "${PROJECT_SOURCE_DIR}/src/config.h.in"
    "${PROJECT_BINARY_DIR}/src/config.h"
)

# ext
set(EXT_INCLUDES_DIR ${PROJECT_SOURCE_DIR}/ext/include)
set(EXT_LIBS_DIR ${PROJECT_SOURCE_DIR}/ext/libs)

# 去哪里找头文件 相当于gcc/clang 中的-I(i的大写字母)参数
include_directories(${EXT_INCLUDES_DIR})

# 去哪里找库文件 .so .dll .dylib 相当于gcc 中的-L参数
link_directories(${EXT_LIBS_DIR})

SET(LIBS 
    unionfind
    graph
    utils
    gtest
    gtest_main
    pthread)

aux_source_directory(. DIR_SRCS)

add_subdirectory(unionfind)
add_subdirectory(graph)
add_subdirectory(utils)

add_executable(algorithm_test ${DIR_SRCS})
target_link_libraries(algorithm_test ${LIBS})
